SERVER_HELP

This file includes previously reported server restrictions or
configuration problems and their solutions to help you get Gmail
Mobile working on almost any server.

If you need to use more than one solution, put ALL relevent lines into
the SAME .htaccess file.

After adding the relevent lines, if you get a "500 Internal Server Error" 
then remove the .htaccess file or comment out the lines you added by placing 
a "#" at the beginning:

# this line has been commented
this line is NOT commented

and then look for another server! ;-)



PHP Safe Mode
=============

There is no solution to this restriction.  For full functionality of
gmail-mobile, another server WITHOUT PHP Safe Mode ON must be used.

PHP Safe Mode is a server's or admin's way to limit PHP functions
which can or are abused.  This is common in shared server
environments, though, there are also many webhosts which do not place
this restriction on its users.

gmail-mobile tries to use only the most widely available and
compatible functions of PHP.  Some of the latest, more advanced
features require a few PHP functions which may be restricted on
servers in safe mode.

The following features of Gmail will not work properly or at all.
Technical reasons are in [square brackets].

1) Loading the cURL extension it is not already loaded [dl() disabled] 
2) Attachment downloading [fopen() and passthru() restricted] 
3) PIN code signin [fopen() and unlink() restricted] 
4) Login challenge, where gmail displays a graphic with characters to
     be entered (future feature) [passthru() restricted]
5) Attachment upload (future feature) [fopen() and directory restrictions] 
 
This is not an exhaustive list.  All varieties of safe mode are not
created equal. A server may place additional or arbritrary
restrictions on certain php commands than the standard set.  There may
also be hidden effects related to cURL.




Short Open Tags
(a.k.a. Require "<?php" instead of simply "<?")
===============================================

Some servers require that the php long tag be used.  This would
normally mean that you would have to replace ALMOST all instances of
"<?" with "<?php".  This, of course, is a quite a pain.  It can also
introduce unwanted errors if something is mistyped.

Enter the following line in an .htaccess file (See intructions at the
bottom):

    php_flag short_open_tag on





PHP 4 and session.use_trans_sid
===============================

This is NO longer necessary starting with gmail-mobile version 1.1  





Arguement separator
===================

When to suspect this problem:  Upon logging in, when trying to view
the summary screen, you will recieve a "No Gateway Reply" error AND
you DO NOT have any &'s in any of your Labels.  When trying on an
emulator, you might notice "invalid entity" with a pointer to "&sess"
or "&PHPSESSID" or similar.

The problem lies in the fact that by definition, all &'s MUST be
'escaped' in WML (and HTML, but browsers are not that strict).  The
gmail-mobile library (libgmailer) attempts to set the escaping when
adding session ids, however, it seems to have failed.  This is
generally due to a server restriction.

Enter the following line in an .htaccess file (See intructions at the
bottom):

    php_value arg_separator.output '&amp;'





Session Name
============

This is OPTIONAL, but nice to do.

The built in php session name is long: PHPSESSID.  gmail-mobile
attempts to make it shorter by naming it 'sess', but it is not always
possible.  On pages with many links, this can save a substantial
number of bytes, and would be more important on mobiles with small
page size limits.

Enter the following line in an .htaccess file (See intructions at the
bottom):

    php_value session.name 'sess'






======================================================================

        Making / Using an .htaccess file

======================================================================

This solution should work on servers running Apache as the web server.
It MAY work on others (e.g. IIS?).

1) Create a new text file.  Use a TEXT editor, NOT a WORD processor!

2) Enter the line(s) required as per the solutions found above.

3) Save the file with the filename ".htaccess" (no quotes).  If a starting 
"." is not allowed, upload the file and then rename it to add the ".".

4) Upload this file into the gmail-mobile directory.

5) gmail-mobile SHOULD now work.  If it still does not, please post in
the HELP forum.  If you get a "500 Internal Server Error" then remove
the .htaccess file or comment out the lines you added by placing a "#"
at the beginning:

# this line has been commented
this line is NOT commented

and then look for another server! ;-)

